/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lucene.WordNet;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Livia
 */
public class TestMap {
    
    public TestMap() throws FileNotFoundException, IOException{
         String[] words = new String[] { "hard", "woods", "forest", "wolfish", "xxxx"};
         SynonymMap map = new SynonymMap(new FileInputStream(
                 "C:\\Users\\Livia\\Desktop\\ITA_5o ano\\TG\\WordNet\\prolog\\wn_s.pl"));

         int i;
         for (i = 0; i < words.length; i++) {
            String[] synonyms = map.getSynonyms(words[i]);
            System.out.println(words[i] + ":" + java.util.Arrays.asList(synonyms).toString());
        } 
    }
    
    public static void main(String[] args){
        try {
            new TestMap();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(TestMap.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(TestMap.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
